<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<div class="bg-content">
	<div class="col-xs-11">
		<div class="row">
			<div class="row-md-4 span8">
			</div>
			<article class="span8">
				<h3>修改仓库</h3>
				<hr />
				<div class="inner-1">
					<form id="contact-form" action="${pageContext.request.contextPath}/repository/update" method="post">
						<input type="hidden" name="id" value="${repository.id} ">
						<fieldset>
							<div>
								<label style="width: 80px;">名称：</label>
								<input type="text" name="name" class="form-control" value="${repository.name }">
							</div>
							<div>
								<label style="width: 80px;">县：</label>
								<select name="districtId" class="form-control">
									<c:forEach items="${districts }" var="district">
										<c:if test="${repository.districtId==district.id }">
											<option value="${district.id }" selected="selected">${district.name }</option>
										</c:if>
										<c:if test="${repository.districtId!=district.id }">
											<option value="${district.id }">${district.name }</option>
										</c:if>
									</c:forEach>
								</select>
							</div>
							<div>
								<label style="width: 80px;">地址：</label>
								<textarea name="address" class="form-control">${repository.address }</textarea>
							</div>
						</fieldset>
						<br />
					    <button class="btn btn-lg btn-primary btn-block" type="submit">保存</button>
					</form>
				</div>
			</article>
		</div>
	</div>
</div>
